# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=yersinia
pkgver=0.8.2
pkgrel=1
pkgdesc="Framework for performing layer 2 attacks"
url="https://github.com/tomac/yersinia"
arch="all"
license="GPL"
makedepends="libnet-dev libpcap-dev ncurses-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/tomac/yersinia/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver

prepare() {
	default_prepare
	update_config_guess
}

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--with-pcap-includes=/usr/include \
		--disable-gtk
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR=$pkgdir install
}

sha512sums="2c7c89f19b6791150c472a6066b6ffaf9ac5b3d1a3d2e6a27f91293bba9a0f72d147266731e5e2670e4bf7e67ccf04b6e353071ca42d3d281b25126c9bfcb1dd  yersinia-0.8.2.tar.gz"
